]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Revert "appDisplay/baseAppView: Cleanup animate()"
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 11 Dec 2020 15:55:23 +0000 (12:55 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 11 Dec 2020 16:24:28 +0000 (13:24 -0300)
This reverts commit cd8269185. It turns out this seemingly
harmless cleanup introduced a regression:

 * Open overview
 * Press Meta+A twice
 * Close overview
 * Press Meta+A
 * Enjoy an invisible grid

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3451

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1532>

js/ui/appDisplay.js

index d3593b31e9f987959b584e726ab357f6b1cdf3e3..09e035d6e4be64b68ae0110c8cc3650cc3714191 100644 (file)
@@ -696,6 +696,7 @@ var BaseAppView = GObject.registerClass({
     }
 
     _doSpringAnimation(animationDirection) {
+        this._grid.opacity = 255;
         this._grid.animateSpring(
             animationDirection,
             Main.overview.dash.showAppsButton);
@@ -713,16 +714,15 @@ var BaseAppView = GObject.registerClass({
     }
 
     animate(animationDirection, onComplete) {
-        const animationDoneId = this._grid.connect('animation-done', () => {
-            this._grid.disconnect(animationDoneId);
-            this._grid.opacity =
-                animationDirection === IconGrid.AnimationDirection.IN
-                    ? 255 : 0;
-            if (onComplete)
+        if (onComplete) {
+            let animationDoneId = this._grid.connect('animation-done', () => {
+                this._grid.disconnect(animationDoneId);
                 onComplete();
-        });
+            });
+        }
 
         this._clearAnimateLater();
+        this._grid.opacity = 255;
 
         if (animationDirection == IconGrid.AnimationDirection.IN) {
             const doSpringAnimationLater = laterType => {
@@ -734,18 +734,18 @@ var BaseAppView = GObject.registerClass({
                     });
             };
 
-            this._grid.opacity = 0;
             if (this._viewIsReady) {
+                this._grid.opacity = 0;
                 doSpringAnimationLater(Meta.LaterType.IDLE);
             } else {
                 this._viewLoadedHandlerId = this.connect('view-loaded',
                     () => {
                         this._clearAnimateLater();
+                        this._grid.opacity = 255;
                         doSpringAnimationLater(Meta.LaterType.BEFORE_REDRAW);
                     });
             }
         } else {
-            this._grid.opacity = 255;
             this._doSpringAnimation(animationDirection);
         }
     }